package com.gxuwz.business.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.gxuwz.business.dao.impl.BaseDaoImpl;
import com.gxuwz.business.entity.SysRight;

@Repository("sysRightDAO")
public class SysRightDAO extends BaseDaoImpl<SysRight> {
	

	/**
	 * 删除权限
	 * @param sysRight
	 */
	public void delete(SysRight sysRight) {
		System.out.println(sysRight.getRightId()+"DAO！");
		getHibernateTemplate().delete(sysRight);
		
	}
	/**
	 * 修改权限
	 */
   public void update(SysRight sysRight) {
	getHibernateTemplate().update(sysRight);
  }
   
   /**
	 * 升序查询所有权限
	 * @return
	 */
public List<SysRight> getAllRight() {
	String queryString="from SysRight where 1=1 order by rightSortOrder asc";
	return (List<SysRight>) getHibernateTemplate().find(queryString);
}
}
